import pymysql
kwargs={
    "host":"localhost",
    "port":3306,
    "user":"root",
    "password":"123456",
    "database":"stu",
    "charset":"utf8"
}
db=pymysql.connect(**kwargs)
cur=db.cursor()

uuu=input("请输入用户名：")
mmm=input("请输入密码：")
sql="select name from user where user=%s and password=%s;"
cur.execute(sql,[uuu,mmm])
if cur.execute():
    print(True)
else:
    print(False)



cur.close()
db.close()

